#!/usr/bin/env dash
# neeasade
# print icon for different symbols in a few different fonts
# targetting: awesome, siji, ionic.
# usage: $0  <icon_type/code>

if ! $p_icon_enable; then
    exit
fi

case $1 in
    # awesome, siji, ionic.
    desktop)  icon='f108 e1d7 f380';;
    battery)  icon='f240 e1fe f113';;
    clock)    icon='f017 e015 f26e';;
    cloud)    icon='f0c2 e22b f12b';;
    file)     icon='f15c e1ed f12e';;
    folder)   icon='f07c e1d9 f139';;
    lock)     icon='f023 e029 f458';;
    logoff)   icon='f08b e157 f29f';;
    mail)     icon='f0e0 e072 f132';;
    music)    icon='f025 e04d f192';;
    next)     icon='f050 e09c f223';;
    pause)    icon='f04c e09b f478';;
    play)     icon='f04b e058 f488';;
    prev)     icon='f049 e096 f222';;
    rotate)   icon='f01e e1c0 f201';;
    shutdown) icon='f011 e00d f2a9';;
    sound)    icon='f028 e05d f259';;
    up)       icon='f062 e060 f10c';;
    world)    icon='ff0a e1a0 f4d3';;
    window)   icon='f2d0';;
    linux)    icon='f17c';;
    github)   icon='f09b';;
    *)        icon="$*";;
esac

iconfont=awesome


case $iconfont in
    awesome) index=1;;
    siji)    index=2;;
    ionic)   index=3;;
    *) exit 1;;
esac

icon_result="$(env printf "\u$(echo $icon | cut -d ' ' -f$index) ")"

env printf "$icon_result"
